<template>
  <el-card>
    <div class="title">{{ title }}</div>
    <div class="value">{{ value }}</div>
    <div class="body"><slot /></div>
    <div class="footer"><slot name="footer" /></div>
  </el-card>
</template>

<script lang="ts">
export default {
  name: "CommonCard",
};
</script>

<script lang="ts" setup>
defineProps<{
  title: string;
  value: number;
}>();
</script>

<style scoped>
.title {
  font-size: 12px;
  color: gray;
}
.value {
  font-size: 25px;
  margin: 5px 0;
}
.body {
  height: 50px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
.footer {
  border-top: 1px solid #eee;
  margin-top: 10px;
  padding-top: 10px;
  font-size: 12px;
}
</style>
